//切换经脉流派 {"旧流派":"浴血豪侠","新流派":"无双战神"}

// @ts-ignore
export async function execute(client_id,message_json) {
    let characters = G.Characters.get_current_login_characters(client_id);
    let new_lp = message_json["新流派"];
    if(characters["体力"] < 10 || characters["活力"] < 10){
        ClientUtils.send_basic_prompt(client_id,"体活不足！");
        return;
    }
    G.Characters.consume_number_field_value(characters["id"],"体力",10);
    G.Characters.consume_number_field_value(characters["id"],"活力",10);
    if(!characters["奇经八脉"]["流派"].includes(new_lp)){
        ClientUtils.send_basic_prompt(client_id,"流派不存在");
        return;
    }
    characters["奇经八脉"]=G.Sects.sects_jingmai[characters["门派"]];
    characters["奇经八脉"]["当前流派"]=new_lp;
    characters["QYD"]["可用乾元丹"]=characters["QYD"]["已换乾元丹"]+characters["QYD"]["额外乾元丹"];
    characters["QYD"]["已用乾元丹"]=0;
    G.Characters.reset_sects_skill(characters);
    //通知客户端刷新数据
    ClientUtils.send_client_message(client_id,31,characters);
    ClientUtils.send_client_message(client_id,242,1);
}
